package com.itheima.pinda.zuul.api;

import com.itheima.pinda.authority.dto.auth.ResourceQueryDTO;
import com.itheima.pinda.authority.entity.auth.Resource;
import com.itheima.pinda.base.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

/**
 * @Description: 资源api
 * @Author: ysf
 * @CreateTime: 2024-11-14  11:25
 * @Version: 1.0
 */
@FeignClient(name = "${pinda.feign.authority-server:pd-auth-server}"
        , fallback = ResourceApiFallback.class)
public interface ResourceApi {

    /**
     * 获取所需鉴权的资源权限
     */
    @GetMapping("/resource/list")
    R<List> list();


    /**
     * 获取当前用户的拥有资源权限
     */
    @GetMapping("/resource")
    R<List<Resource>> visible(ResourceQueryDTO resourceQueryDTO);
}
